<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/view/common/easycommon.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>首页门户</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css"
	href="${basepath}/assets/jqueryui/jquery-ui.min.css">
<script src="${basepath}/assets/jqueryui/jquery-ui.min.js"></script>

<style>
.draggable {
	float: left;
}

.dragtoolbar {
	background-color: #ccc;
	padding: 6px 6px 6px 5px;
	background-image: url(${basepath}/css/img/titleback.png);
	background-repeat: repeat-x;
	height: 16px;
}

.dragcontent {
	padding: 2px;
}

.dragdiv {
	width: 420px;
	height: 250px;
	margin: 2px
}
body{
	font-size: 12px;
	font-family: "avgardn","Microsoft Yahei", '微软雅黑';
}
li{
	padding:2px;
}
</style>
<script src="${basepath}/js/protal/init.js"></script>
<script>
	function formatOper_rdkh(val, row, index) {
		return '<a href="#" onclick="showPop(\'' + row.id + '\')">'
				+ val + '</a>';
	}

	function formatOper_xsfy(val, row, index) {
		return '<a href="#" onclick="showPop(\'' + row.id + '\')">'
				+ val + '</a>';
	}
	
	var showPop = function(id){
		var url = speraoa.oaurl+"/ShopAdmin/c/Customer/CustomerView?id="+id;
		//if(id){
		//	url += "?id="+id;
		//}
		layIndex = layer.open({
			title:"客户视图",
			type: 2,
			fix: false,
	        maxmin: true,
	        area: ['1220px', '670px'],
		    content: url,
		    cancel: function(index){
	        }
		});
	}
</script>
</head>
<body id="thisbody">
	<div id="draggable_rdkh" class="draggable" <c:if test="${rdkh_per eq '0'}"> style="display:none" </c:if>>
		<div class="dragdiv ui-widget-content">
			<div class="dragtoolbar">&gt 热点客户</div>
			<div class="dragcontent">
				<table id="datatable_rdkh" class="easyui-datagrid"
					singleSelect="true" iconCls="icon-save"
					style="width: 400px; height: 220px">
				</table>
			</div>
		</div>
	</div>
	<div id="draggable_xsfy" class="draggable" <c:if test="${xsfy_per eq '0'}"> style="display:none" </c:if>>
		<div class="dragdiv ui-widget-content">
			<div class="dragtoolbar">&gt 销售费用</div>
			<div class="dragcontent">
				<table id="datatable_xsfy" class="easyui-datagrid"
					singleSelect="true" iconCls="icon-save"
					style="width: 400px; height: 220px">
				</table>
			</div>
		</div>
	</div>
	<div id="draggable_jnr" class="draggable" <c:if test="${jnr_per_per eq '0'}"> style="display:none" </c:if>>
		<div class="dragdiv ui-widget-content">
			<div class="dragtoolbar">&gt 纪念日</div>
			<div class="dragcontent">
				<ul style="padding-left: 30px">
					<c:forEach items="${jnr_dataList}" var="data">
						<li><a href="#" onclick="parent.showPop(${data.id})">${data.customerName}</a>，${data.specialDayTypeName}，${data.specialDate}</li>
					</c:forEach>
				</ul>
			</div>
		</div>
	</div>
	<div id="draggable_rc" class="draggable" <c:if test="${rc_per eq '0'}"> style="display:none" </c:if>>
		<div class="dragdiv ui-widget-content">
			<div class="dragtoolbar">&gt 日程</div>
			<div class="dragcontent">
				<ul style="padding-left: 30px">
					<c:forEach items="${rc_dataList}" var="data">
						<li><a href="#" onclick="parent.showPop(${data.id})">${data.ownerName}</a>，${data.title}，${data.beginTime}</li>
					</c:forEach>
				</ul>
			</div>
		</div>
	</div>
	<div id="draggable_khts" class="draggable" <c:if test="${khts_per eq '0'}"> style="display:none" </c:if>>
		<div class="dragdiv ui-widget-content">
			<div class="dragtoolbar">&gt 客户投诉</div>
			<div class="dragcontent">
				<ul style="padding-left: 30px">
					<c:forEach items="${khts_dataList}" var="data">
						<li><a href="#" onclick="parent.showPop('${data.id}')">${data.customerName}</a>，${data.complaintTypeName}，${data.complaintDate}，${data.complaintTitle}</li>
					</c:forEach>
				</ul>
			</div>
		</div>
	</div>
	<div id="draggable_xsyj" class="draggable" <c:if test="${xsyj_per eq '0'}"> style="display:none" </c:if>>
		<div class="dragdiv ui-widget-content">
			<div class="dragtoolbar">&gt 销售业绩</div>
			<div class="dragcontent">
				<ul style="padding-left: 30px">
					<li>目标销售额：${xsyj_dataList.xse_mb}</li>
					<li>实际销售额：${xsyj_dataList.xse_sj}</li>
					<li>实际完成度：${xsyj_dataList.xse_wcd}</li>
					<li>目标客户数：${xsyj_dataList.xzkhs_mb}</li>
					<li>新增客户数：${xsyj_dataList.xzkhs_sj}</li>
					<li>新增合约数：${xsyj_dataList.qykhs_sj}</li>
				</ul>
			</div>
		</div>
	</div>
	<div id="draggable_kcyj" class="draggable" <c:if test="${kcyj_per eq '0'}"> style="display:none" </c:if>>
		<div class="dragdiv ui-widget-content">
			<div class="dragtoolbar">&gt 库存预警</div>
			<div class="dragcontent" style="padding:20px">
				<c:if test="${fn:length(kcsx_dataList)>0}">
					上限（积压）预警：
					<c:forEach items="${kcsx_dataList}" var="data">
						<ul style="padding-left: 30px">
							<li>${data.productName}/${data.productUnitType}:${data.quantity}&gt${data.maxQuantity}</li>
						</ul>
					</c:forEach>
				</c:if>
				<c:if test="${fn:length(kcxx_dataList)>0}">
					下限（缺货）预警：
					<c:forEach items="${kcxx_dataList}" var="data">
						<ul style="padding-left: 30px">
							<li>${data.productName}/${data.productUnitType}:${data.quantity}&it${data.minQuantity}</li>
						</ul>
					</c:forEach>
				</c:if>
			</div>
		</div>
	</div>
	<div id="draggable_kczc" class="draggable" <c:if test="${kczc_per eq '0'}"> style="display:none" </c:if>>
		<div class="dragdiv ui-widget-content">
			<div class="dragtoolbar">&gt 库存资产</div>
			<div class="dragcontent">
				<table id="datatable_kczc" class="easyui-datagrid"
					singleSelect="true" iconCls="icon-save"
					style="width: 400px; height: 220px">
				</table>
			</div>
		</div>
	</div>
</body>
</html>
